package com.itheima.work1120s;

import java.util.ArrayList;
import java.util.List;

public class Grade {
    private List<Classroom> classrooms;

    public Grade() {
        this.classrooms = new ArrayList<>();
    }

    public void addClassroom(Classroom classroom) {
        classrooms.add(classroom);
    }

    public void printAllStudents() {
        for (Classroom classroom : classrooms) {
            System.out.println("Classroom Students:");
            for (Student student : classroom.getStudents()) {
                System.out.println(student);
            }
        }
    }
}
